package com.dgut.staffmodule.service;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;

import com.dgut.staffmodule.entity.Department;
import com.dgut.staffmodule.entity.DepartmentEditDTO;

public interface IDepartmentService {
	public void saveOrUpdate(Department department);// 判断id为空，则save，id不为空，则update

	public void save(DepartmentEditDTO departmentEditDTO);// 保存新增信息

	public void update(DepartmentEditDTO departmentEditDTO);// 保存更改信息

	public boolean delete(Department department);// 删除单个部门

	public boolean delete(List<Long> ids);// 批量删除部门

	public Department findOne(Long id);// 查找部门

	public List<Department> findAll();// 查找所有部门

	public Page<Department> findAll(Specification<Department> spec, Pageable pageable);// 分页查找部门

	public Department findByDeptName(String department);
	/*
	 * public int addCount(Long id); public int descCount(Long id); public int
	 * descCount(Long id,int size);
	 */

	public Department findDeptAudit(Long id);

}
